package com.plian.system.service.im;

import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.metadata.fill.FillConfig;
import com.plian.system.dto.im.FundProjectInfoDTO;
import com.plian.system.entity.im.FundProject;
import com.plian.system.mybatis.base.BaseService;
import com.plian.system.vo.im.FundProjectExecutionVO;
import com.plian.system.vo.im.FundProjectVO;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 服务类
 *
 * @author
 * @since 2019-09-27
 */
public interface IFundProjectService extends BaseService<FundProject> {

    /**
     * 保存 包含子表
     * @param fundProject
     * @return
     */
    boolean submit(FundProject fundProject);

    /**
     * 获取detail obj对象
     * @param fundProjectVOS
     * @return
     */
    List<FundProjectVO> getDetailPd(List<FundProjectVO> fundProjectVOS);

    /**
     * 获取上月detail obj对象
     * @param fundProjectVOS
     * @return
     */
    List<FundProjectVO> getLastMonthInfos(List<FundProjectVO> fundProjectVOS);

    /**
     * 市属国企基金项目情况 sheet页 数据写入
     * @param fundProjects
     * @param excelWriter
     * @param writeSheet
     * @param fillConfig
     */
    void write(List<FundProject> fundProjects, ExcelWriter excelWriter, WriteSheet writeSheet, FillConfig fillConfig);

    /**
     * 市属国企基金项目情况VO sheet页 数据写入
     * @param fundProjects
     * @param excelWriter
     * @param writeSheet
     * @param fillConfig
     */
    void writeVO(List<FundProjectVO> fundProjects, ExcelWriter excelWriter, WriteSheet writeSheet, FillConfig fillConfig);

    /**
     * 根据主表删除
     * @param ids
     * @return
     */
    boolean deleteByParentId(List<Long> ids);

    /**
     * 基金项目投资计划执行导出
     * @param fundProjectExecutionVOS
     * @param response
     */
    public void exportReport(List<FundProjectExecutionVO> fundProjectExecutionVOS, FundProjectInfoDTO fundProjectInfoDTO, HttpServletResponse response);
}
